﻿#if !(EXPERIMENTAL_IL2CPP_PUERTS && ENABLE_IL2CPP)
using System;
using Puerts;

namespace PuertsStaticWrap
{
#pragma warning disable 0219
    public static class UnityEngine_Random_Wrap
    {
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8ConstructorCallback))]
        internal static IntPtr Constructor(IntPtr isolate, IntPtr info, int paramLen, long data)
        {
            try
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "invalid arguments to "
                        + typeof(UnityEngine.Random).GetFriendlyName()
                        + " constructor"
                );
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
            return IntPtr.Zero;
        }

        // ==================== constructor end ====================

        // ==================== methods start ====================
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void F_ColorHSV(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                if (paramLen == 0)
                {
                    {
                        var result = UnityEngine.Random.ColorHSV();

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        float arg0 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value0, false);
                        float arg1 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value1, false);

                        var result = UnityEngine.Random.ColorHSV(arg0, arg1);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 4)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    IntPtr v8Value2 = PuertsDLL.GetArgumentValue(info, 2);
                    object argobj2 = null;
                    JsValueType argType2 = JsValueType.Invalid;
                    IntPtr v8Value3 = PuertsDLL.GetArgumentValue(info, 3);
                    object argobj3 = null;
                    JsValueType argType3 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value2,
                            ref argobj2,
                            ref argType2
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value3,
                            ref argobj3,
                            ref argType3
                        )
                    )
                    {
                        float arg0 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value0, false);
                        float arg1 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value1, false);
                        float arg2 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value2, false);
                        float arg3 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value3, false);

                        var result = UnityEngine.Random.ColorHSV(arg0, arg1, arg2, arg3);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 6)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    IntPtr v8Value2 = PuertsDLL.GetArgumentValue(info, 2);
                    object argobj2 = null;
                    JsValueType argType2 = JsValueType.Invalid;
                    IntPtr v8Value3 = PuertsDLL.GetArgumentValue(info, 3);
                    object argobj3 = null;
                    JsValueType argType3 = JsValueType.Invalid;
                    IntPtr v8Value4 = PuertsDLL.GetArgumentValue(info, 4);
                    object argobj4 = null;
                    JsValueType argType4 = JsValueType.Invalid;
                    IntPtr v8Value5 = PuertsDLL.GetArgumentValue(info, 5);
                    object argobj5 = null;
                    JsValueType argType5 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value2,
                            ref argobj2,
                            ref argType2
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value3,
                            ref argobj3,
                            ref argType3
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value4,
                            ref argobj4,
                            ref argType4
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value5,
                            ref argobj5,
                            ref argType5
                        )
                    )
                    {
                        float arg0 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value0, false);
                        float arg1 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value1, false);
                        float arg2 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value2, false);
                        float arg3 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value3, false);
                        float arg4 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value4, false);
                        float arg5 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value5, false);

                        var result = UnityEngine.Random.ColorHSV(
                            arg0,
                            arg1,
                            arg2,
                            arg3,
                            arg4,
                            arg5
                        );

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 8)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    IntPtr v8Value2 = PuertsDLL.GetArgumentValue(info, 2);
                    object argobj2 = null;
                    JsValueType argType2 = JsValueType.Invalid;
                    IntPtr v8Value3 = PuertsDLL.GetArgumentValue(info, 3);
                    object argobj3 = null;
                    JsValueType argType3 = JsValueType.Invalid;
                    IntPtr v8Value4 = PuertsDLL.GetArgumentValue(info, 4);
                    object argobj4 = null;
                    JsValueType argType4 = JsValueType.Invalid;
                    IntPtr v8Value5 = PuertsDLL.GetArgumentValue(info, 5);
                    object argobj5 = null;
                    JsValueType argType5 = JsValueType.Invalid;
                    IntPtr v8Value6 = PuertsDLL.GetArgumentValue(info, 6);
                    object argobj6 = null;
                    JsValueType argType6 = JsValueType.Invalid;
                    IntPtr v8Value7 = PuertsDLL.GetArgumentValue(info, 7);
                    object argobj7 = null;
                    JsValueType argType7 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value2,
                            ref argobj2,
                            ref argType2
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value3,
                            ref argobj3,
                            ref argType3
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value4,
                            ref argobj4,
                            ref argType4
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value5,
                            ref argobj5,
                            ref argType5
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value6,
                            ref argobj6,
                            ref argType6
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value7,
                            ref argobj7,
                            ref argType7
                        )
                    )
                    {
                        float arg0 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value0, false);
                        float arg1 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value1, false);
                        float arg2 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value2, false);
                        float arg3 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value3, false);
                        float arg4 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value4, false);
                        float arg5 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value5, false);
                        float arg6 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value6, false);
                        float arg7 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value7, false);

                        var result = UnityEngine.Random.ColorHSV(
                            arg0,
                            arg1,
                            arg2,
                            arg3,
                            arg4,
                            arg5,
                            arg6,
                            arg7
                        );

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to ColorHSV");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void F_InitState(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    ;
                    {
                        int arg0 = (int)PuertsDLL.GetNumberFromValue(isolate, v8Value0, false);

                        UnityEngine.Random.InitState(arg0);
                    }
                }
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void F_Range(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(float),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        float arg0 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value0, false);
                        float arg1 = (float)PuertsDLL.GetNumberFromValue(isolate, v8Value1, false);

                        var result = UnityEngine.Random.Range(arg0, arg1);

                        Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
                        return;
                    }
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(int),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(int),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        int arg0 = (int)PuertsDLL.GetNumberFromValue(isolate, v8Value0, false);
                        int arg1 = (int)PuertsDLL.GetNumberFromValue(isolate, v8Value1, false);

                        var result = UnityEngine.Random.Range(arg0, arg1);

                        Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to Range");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        // ==================== methods end ====================

        // ==================== properties start ====================
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_state(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var result = UnityEngine.Random.state;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void S_state(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                object argobj0 = null;
                argobj0 =
                    argobj0 != null
                        ? argobj0
                        : StaticTranslate<UnityEngine.Random.State>.Get(
                            (int)data,
                            isolate,
                            NativeValueApi.GetValueFromArgument,
                            v8Value0,
                            false
                        );
                UnityEngine.Random.State arg0 = (UnityEngine.Random.State)argobj0;
                UnityEngine.Random.state = arg0;
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_value(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var result = UnityEngine.Random.value;
                Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_insideUnitSphere(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var result = UnityEngine.Random.insideUnitSphere;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_insideUnitCircle(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var result = UnityEngine.Random.insideUnitCircle;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_onUnitSphere(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var result = UnityEngine.Random.onUnitSphere;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_rotation(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var result = UnityEngine.Random.rotation;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_rotationUniform(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var result = UnityEngine.Random.rotationUniform;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }
        // ==================== properties end ====================
        // ==================== array item get/set start ====================


        // ==================== array item get/set end ====================
        // ==================== operator start ====================
        // ==================== operator end ====================
        // ==================== events start ====================
        // ==================== events end ====================
    }
#pragma warning disable 0219
}
#endif
